package licode.unisop.oidc.auth.conf;

/**
 * 定义Oauth2的相关常量
 *
 * @author licode
 */
public class AuthorDef {
    public static final String BEARER_TYPE = "Bearer";
    public static final String OAUTH2_TYPE = "OAuth2";

    /**
     * 令牌类型，默认值undefined
     */
    public static final String TOKEN_TYPE = "token_type";
    public static final String EXPIRES_IN = "expires_in";

    public static final String RESPONSE_TYPE = "response_type";
    public static final String CLIENT_ID = "client_id";
    public static final String CLIENT_SECRET = "client_secret";
    public static final String REDIRECT_URI = "redirect_uri";
    public static final String SCOPE = "scope";
    public static final String STATE = "state";
    public static final String CODE = "code";
    public static final String TOKEN = "token";
    public static final String ACCESS_TOKEN = "access_token";
    public static final String REFRESH_TOKEN = "refresh_token";

    /**
     * 客户端授权类型，取值如下：
     * 1）authorization_code 授权码模式
     * 2）client_credentials 客户模式（使用client_id和client_secret就可以）
     * 3）implicit 隐式模式
     * 4）password 密码模式（使用用户密码验证）
     * 5）refresh_token 刷新token模式
     */
    public static final String GRANT_TYPE = "grant_type";

    public static final String USERNAME = "username";
    public static final String PASSWORD = "password";

    public static final String PLATFORM = "platform";
    public static final String TERMINAL = "terminal";
    public static final String TENANT = "tenant";
    public static final String REALMS = "realms";
}
